//package com.mk.security.distributed.order.filter;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.mk.security.distributed.order.common.EncryptUtil;
//import lombok.val;
//import org.springframework.stereotype.Component;
//import org.springframework.web.filter.OncePerRequestFilter;
//
//import javax.servlet.FilterChain;
//import javax.servlet.ServletException;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
//@Component
//public class TokenAuthenticationFilter  extends OncePerRequestFilter {
//    @Override
//    protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {
//        //解析出头中的token
//        String token = httpServletRequest.getHeader("json-token");
//        if(token!=null){
//            String json = EncryptUtil.decodeUTF8StringBase64(token);
//            //将token转成json对象
//            JSONObject jsonObject=JSON.parseObject(json);
//            //用户身份信息
//
//        }
//
//    }
//}
